package MyIO;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Arrays;

public class demo10 {
    public static void main(String[] args) {
        try (Writer writer = new FileWriter("D:\\software\\code\\2023_java\\2023_java_code\\code_24_4_21\\src\\MyFile\\MyText.text")){
            writer.write(97);
            //换行
            writer.write("\r\n");
            writer.write("土豆土豆我是地瓜");
            //换行
            writer.write("\r\n");
            writer.write('c');

            //换行
            writer.write("\r\n");
            String s = "地瓜地瓜我是土豆";
            writer.write(s.toCharArray());

        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
